home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / File / c / Exists < prev    next >
Text File  |  1994-06-08  |  1KB  |  30 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for 
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #                                      
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    File.Exists.c
  12.     Author:  Copyright © 1993,1994 Jason Williams, Jason Howat
  13.     Version: 1.01 (08 Jun 1994)
  14.     Purpose: Checks if a given file exists (can be read)
  15.              Note that directories cannot be read, so will be returned as
  16.              non existent.
  17. */
  18.  
  19.  
  20. #include "DeskLib:File.h"
  21. #include "kernel.h"
  22.  
  23.  
  24. extern BOOL File_Exists(char *filename)
  25. {
  26.   _kernel_osfile_block osfile;
  27.  
  28.   return (_kernel_osfile(17, filename, &osfile) == 1);
  29. }
  30.